package com.dongdongshop.exception;


/**
 * 全局统一异常拦截器 拦截所有带有Controller和RestController注解的方法
 * @Author Eayon
 * @Date 2020/2/22 13:13
 */
//@ControllerAdvice
public class GlobalExceptionHandler {

    //static final Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class);

    /**
     * 捕获所有异常
     * @param e
     * @param req
     * @return
     */
    /*@ExceptionHandler(Exception.class)
    @ResponseBody
    public Object myExceptionHandler(Exception e, HttpServletRequest req){
        logger.error("该请求：{}，异常如下",req.getRequestURI(),e);
        return new DataResult(HttpResultEnum.ERROR.getCode(),e.getMessage());
    }*/
}
